//
//  UIViewController+TS.swift
//  TSKit
//
//  Created by chenyusen on 2018/3/15.
//

import Foundation

private var isPopGestureEnableKey: Void?

// MARK: - 控制器扩展
extension TSKit where Base: UIViewController {
    /// 当前控制器视图是否支持手势返回, 默认支持
    public var isPopGestureEnable: Bool {
        set { objc_setAssociatedObject(base, &isPopGestureEnableKey, newValue, .OBJC_ASSOCIATION_ASSIGN) }
        get { return objc_getAssociatedObject(base, &isPopGestureEnableKey) as? Bool ?? true }
    }
}
